﻿<dx:DXWindow x:Class="DevControlLibrary.RibbonMainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="查询分析器" 
        xmlns:dxr="clr-namespace:DevExpress.Xpf.Ribbon;assembly=DevExpress.Xpf.Ribbon.v12.1" 
        xmlns:dxb="clr-namespace:DevExpress.Xpf.Bars;assembly=DevExpress.Xpf.Core.v12.1"
        xmlns:dx="clr-namespace:DevExpress.Xpf.Core;assembly=DevExpress.Xpf.Core.v12.1"
        xmlns:dxd="clr-namespace:DevExpress.Xpf.Docking;assembly=DevExpress.Xpf.Docking.v12.1"  
        xmlns:ui="clr-namespace:DevControlLibrary.UI" 
        xmlns:ctrl="clr-namespace:BaseControlLibrary;assembly=BaseControlLibrary"     
        WindowStartupLocation="CenterScreen" 
        WindowState="Maximized"
        FontSize="12"
        FontFamily="NSimSun"
        TextOptions.TextFormattingMode="Display"
        TextOptions.TextRenderingMode="ClearType"
        Icon="/logo2.ico" >
    
    <Window.Resources>
        <RoutedUICommand Text="格式刷" x:Key="txtFormat"/>
        <RoutedUICommand Text="复制" x:Key="copyFieldName"/>
        <RoutedUICommand Text="保存" x:Key="fileSave"/>
        <RoutedUICommand Text="另存为" x:Key="fileSaveAs"/>
        <RoutedUICommand Text="运行" x:Key="runSQL"/>
        <RoutedUICommand Text="删除数据源" x:Key="deldb"/>
        <RoutedUICommand Text="连接" x:Key="dbconnection"/>
        <RoutedUICommand Text="断开" x:Key="dbunconnection"/>
        <RoutedUICommand Text="清空" x:Key="txtClear"/>
        <RoutedUICommand Text="注释" x:Key="Comment"/>
        <RoutedUICommand Text="取消注释" x:Key="NoComment"/>
     
        <RoutedUICommand Text="设置数据库" x:Key="comconnection"/>
        <RoutedUICommand Text="刷新" x:Key="comrefresh"/>
        <RoutedUICommand Text="数据结构对比" x:Key="comdata"/>
        <RoutedUICommand Text="数据结构同步" x:Key="comsync"/>
        <RoutedUICommand Text="数据行数对比" x:Key="comrowcount"/>
        <RoutedUICommand Text="数据同步" x:Key="comexportrow"/>
        <RoutedUICommand Text="部分数据同步" x:Key="compartexportrow"/>
        <RoutedUICommand Text="移除相同表" x:Key="comremovetable"/>
        <RoutedUICommand Text="数据内容对比" x:Key="comrowcontent"/>

        
    </Window.Resources>
    <Window.InputBindings>
        <KeyBinding Modifiers="Ctrl" Key="C" Command="{StaticResource copyFieldName}"/>
        <KeyBinding Key="F5" Command="{StaticResource runSQL}" />
    </Window.InputBindings>
    <Window.CommandBindings>
        <CommandBinding Command="{StaticResource txtFormat}" CanExecute="TxtFormat_CommandBinding_CanExecute" Executed="TxtFormat_CommandBinding_Executed"/>
        <CommandBinding Command="{StaticResource copyFieldName}" Executed="CopyFieldName_CommandBinding_Executed"/>
        
        <CommandBinding Command="{StaticResource fileSave}" Executed="FileSave_CommandBinding_Executed" CanExecute="FileSave_CommandBinding_CanExecute"/>
        <CommandBinding Command="{StaticResource fileSaveAs}" Executed="FileSaveAs_CommandBinding_Executed" CanExecute="FileSaveAs_CommandBinding_CanExecute"/>
        
        <CommandBinding Command="{StaticResource runSQL}" Executed="RunSQL_CommandBinding_Executed" CanExecute="RunSQL_CommandBinding_CanExecute"/>
        <CommandBinding Command="{StaticResource deldb}" Executed="DelDB_CommandBinding_Executed" CanExecute="DelDB_CommandBinding_CanExecute"/>
        <CommandBinding Command="{StaticResource dbconnection}" Executed="ConnectionDB_CommandBinding_Executed" CanExecute="ConnectionDB_CommandBinding_CanExecute"/>
        <CommandBinding Command="{StaticResource dbunconnection}" Executed="UnConnectionDB_CommandBinding_Executed" CanExecute="UnConnectionDB_CommandBinding_CanExecute"/>
        <CommandBinding Command="{StaticResource txtClear}" Executed="TxtClear_CommandBinding_Executed" CanExecute="TxtClear_CommandBinding_CanExecute"/>
        <CommandBinding Command="{StaticResource Comment}" Executed="Comment_CommandBinding_Executed"/>
        <CommandBinding Command="{StaticResource NoComment}" Executed="NoComment_CommandBinding_Executed"/>
        
        <CommandBinding Command="{StaticResource comconnection}" Executed="ComConnection_CommandBinding_Executed"/>
        <CommandBinding Command="{StaticResource comrefresh}" Executed="ComRefresh_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource comdata}" Executed="ComData_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource comsync}" Executed="ComSync_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource comrowcount}" Executed="ComRowCount_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource comexportrow}" Executed="ComExportoRow_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource compartexportrow}" Executed="ComPartExportRow_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource comremovetable}" Executed="ComRemoveTable_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>
        <CommandBinding Command="{StaticResource comrowcontent}" Executed="ComRowContent_CommandBinding_Executed" CanExecute="Comparsion_CanExecute"/>

    </Window.CommandBindings>
    <dxb:BarManager Name="barManager1">
            <dxb:BarManager.Items>
            <dxb:BarButtonItem Name="dbcreate" Content="新建数据源" Command="{Binding ViewModel.CreateDBCommand}" Glyph="/QueryResource;component/Images/Tool/Add_32x32.png"/>
            <dxb:BarButtonItem Name="dbdelete" Content="删除数据源" Command="{StaticResource deldb}" Glyph="/QueryResource;component/Images/Tool/close-32x32.png"/>
            <dxb:BarButtonItem Name="dbconnection" Content="连接" Command="{StaticResource dbconnection}" Glyph="/QueryResource;component/Images/Tree/btnConnect.png"/>
            <dxb:BarButtonItem Name="dbunconnection" Content="断开" Command="{StaticResource dbunconnection}" Glyph="/QueryResource;component/Images/Tree/btnUnConnect.png"/>

              
            <dxb:BarButtonItem Name="fileopen" Content="打开" KeyGesture="Ctrl+O" Command="{Binding ViewModel.FileOpenCommand}" Glyph="/QueryResource;component/Images/Tool/open-32x32.png" />
            <dxb:BarButtonItem Name="filesaveas" Content="另存为" Command="{StaticResource fileSaveAs}" Glyph="/QueryResource;component/Images/Tool/save-32x32.png"/>
            <dxb:BarSplitButtonItem Name="sbSave" Content="保存" KeyGesture="Ctrl+S" Command="{StaticResource fileSave}" Glyph="/QueryResource;component/Images/Tool/save-32x32.png" LargeGlyph="/QueryResource;component/Images/Tool/save-32x32.png"  >
                <dxb:BarSplitButtonItem.PopupControl>
                    <dxb:PopupMenuInfo>
                        <dxb:PopupMenuInfo.ItemLinks>
                            <dxb:BarItemLink BarItemName="filesaveas"  RibbonStyle="SmallWithText"/>
                        </dxb:PopupMenuInfo.ItemLinks>
                    </dxb:PopupMenuInfo>
                </dxb:BarSplitButtonItem.PopupControl>
            </dxb:BarSplitButtonItem>
                
            <dxb:BarButtonItem Name="txtundo" Content="撤销" KeyGesture="Ctrl+Z" Command="Undo" Glyph="/QueryResource;component/Images/Tool/undo-32x32.png"/>
                <dxb:BarButtonItem Name="txtredo" Content="重做" KeyGesture="Ctrl+Y" Command="Redo" Glyph="/QueryResource;component/Images/Tool/redo-32x32.png" />
                <dxb:BarButtonItem Name="txtformat" Content="格式刷" KeyGesture="Ctrl+R" Command="{StaticResource txtFormat}" Glyph="/QueryResource;component/Images/FormatPainter.gif" />
                <dxb:BarButtonItem Name="txtrun" Content="运行" Command="{StaticResource runSQL}" Glyph="/QueryResource;component/Images/run.png" />
                <dxr:RibbonGalleryBarItem Name="gTheme" DropDownGalleryInit="OnThemeDropDownGalleryInit">
                    <dxr:RibbonGalleryBarItem.Gallery>
                        <dxb:Gallery MinColCount="3" ColCount="3" RowCount="3" ItemCheckMode="Single" AllowHoverAnimation="True" AllowHoverImages="True" FilterCaption="Themes" IsItemCaptionVisible="False" ItemCaptionHorizontalAlignment="Center" HoverGlyphSize="128,128" ItemClick="OnThemeItemClick">
                            <dxb:Gallery.Groups>
                                <dxb:GalleryItemGroup Caption="Standard">
                                    <dxb:GalleryItem Caption="DXStyle" Glyph="/QueryResource;component/Images/ThemeIcons/DXStyle.png"/>
                                    <dxb:GalleryItem Caption="VS2010" Glyph="/QueryResource;component/Images/ThemeIcons/VS2010.png"/>
                                    <dxb:GalleryItem Caption="MetropolisDark" Glyph="/QueryResource;component/Images/ThemeIcons/MetropolisDark.png"/>
                                    <dxb:GalleryItem Caption="Seven" Glyph="/QueryResource;component/Images/ThemeIcons/Seven_48x48.png"/>
                                    <dxb:GalleryItem Caption="Light Gray" Glyph="/QueryResource;component/Images/ThemeIcons/LightGray_48x48.png" />
                                    <dxb:GalleryItem Caption="Deep Blue" Glyph="/QueryResource;component/Images/ThemeIcons/DeepBlue_48x48.png"/>
                                </dxb:GalleryItemGroup>
                                <dxb:GalleryItemGroup Caption="Office2007">
                                    <dxb:GalleryItem Caption="Office 2007 Black" Glyph="/QueryResource;component/Images/ThemeIcons/Office2007Black_48x48.png"/>
                                    <dxb:GalleryItem Caption="Office 2007 Blue" Glyph="/QueryResource;component/Images/ThemeIcons/Office2007Blue_48x48.png"/>
                                    <dxb:GalleryItem Caption="Office 2007 Silver" Glyph="/QueryResource;component/Images/ThemeIcons/Office2007Silver_48x48.png" IsChecked="True"/>
                                </dxb:GalleryItemGroup>
                                <dxb:GalleryItemGroup Caption="Office2010">
                                    <dxb:GalleryItem Caption="Office 2010 Black" Glyph="/QueryResource;component/Images/ThemeIcons/Office2010Black_48x48.png"/>
                                </dxb:GalleryItemGroup>
                        </dxb:Gallery.Groups>
                        </dxb:Gallery>
                    </dxr:RibbonGalleryBarItem.Gallery>
                </dxr:RibbonGalleryBarItem>

                <dxb:BarButtonItem Name="bCut" Content="剪切" Command="Cut" Glyph="/QueryResource;component/Images/Tool/cut-16x16.png" KeyGesture="Ctrl+X" />

                <dxb:BarButtonItem Name="bPaste" Content="粘贴" Command="Paste" Glyph="/QueryResource;component/Images/Tool/paste-16x16.png" LargeGlyph="/QueryResource;component/Images/Tool/paste-32x32.png"  KeyGesture="Ctrl+V" />
               
                <dxb:BarButtonItem Name="bClear" Content="清空" Command="{StaticResource txtClear}" Glyph="/QueryResource;component/Images/Tool/Delete_16x16.png"  />
                <dxb:BarButtonItem Name="bFind" Content="查找" Command="Find" Glyph="/QueryResource;component/Images/Tool/Find_16x16.png" LargeGlyph="/QueryResource;component/Images/Tool/Find_32x32.png" KeyGesture="Ctrl+F" />
                <dxb:BarButtonItem Name="bReplace" Content="替换" Command="Replace" Glyph="/QueryResource;component/Images/Tool/Replace-16x16.png" LargeGlyph="/QueryResource;component/Images/Tool/Replace_32x32.png" KeyGesture="Ctrl+H" />
                <dxb:BarButtonItem Name="bSelectAll" Content="全选" Command="SelectAll" KeyGesture="Ctrl+A" Hint="选择全部的文本." Glyph="/QueryResource;component/Images/Tool/SelectAll_16x16.png" LargeGlyph="/QueryResource;component/Images/Tool/SelectAll_32x32.png"/>
            <dxb:BarButtonItem Name="bComment" Content="注释" Command="{StaticResource Comment}" Glyph="/QueryResource;component/Images/IndentIncrease_16x16.png" />
            <dxb:BarButtonItem Name="bNoComment" Content="取消注释" Command="{StaticResource NoComment}" Glyph="/QueryResource;component/Images/IndentDecrease_16x16.png"/>
            <dxb:BarButtonItem Name="bUpdate" Content="更新" KeyGesture="Ctrl+U" Hint="获取最新版本." LargeGlyph="/QueryResource;component/Images/Update.png" ItemClick="bUpdate_ItemClick"/>
            <dxb:BarButtonItem Name="bSetting" Content="配置"  ItemClick="bSetting_ItemClick"  Glyph="/QueryResource;component/Images/Tool/CustomizeMergeField_16x16.png" LargeGlyph="/QueryResource;component/Images/Tool/CustomizeMergeField_32x32.png"/>
                <dxb:BarButtonItem Name="bAddDocument" Content="新建文档" KeyGesture="Ctrl+D" Glyph="/QueryResource;component/Images/Tool/new-16x16.png" LargeGlyph="/QueryResource;component/Images/Tool/new-32x32.png" Command="{Binding ViewModel.AddDocumentCommand}" />
            <dxb:BarButtonItem Name="bAbout" Content="关于" LargeGlyph="/QueryResource;component/Images/Tool/About.png" Command="{Binding ViewModel.AboutCommand}"/>

            <dxb:BarStaticItem Name="lbFieldName" Content="字段:" ItemMinWidth="100"/>
                <dxb:BarStaticItem Name="lbIPname" Content="IP:" ItemMinWidth="100"/>
                <dxb:BarStaticItem Name="lbDBname" Content="数据库连接:" ItemMinWidth="100"/>
                <dxb:BarStaticItem Name="lbUserId" Content="当前用户:" ItemMinWidth="100"/>
            <dxb:BarStaticItem Name="lbUpdateInfo" Content="当前版本:" ItemMinWidth="100" ItemClick="bUpdate_ItemClick"/>
                <!--<dxb:BarButtonItem Name="btnmax" Glyph="/QueryResource;component/Images/winmax.ico" ItemClick="btnmax_ItemClick"/>
                <dxb:BarButtonItem Name="btnmin" Glyph="/QueryResource;component/Images/winmin.ico" ItemClick="btnmin_ItemClick"/>
                <dxb:BarButtonItem Name="btnclose" Glyph="/QueryResource;component/Images/winclose.ico" ItemClick="btnclose_ItemClick"/>-->
            <dxb:BarButtonItem Name="comparsion_connection" Content="设置数据库" Command="{StaticResource comconnection}" Glyph="/QueryResource;component/Images/Tree/btnConnect.png"/>
            <dxb:BarButtonItem Name="comparsion_refresh" Content="重新加载数据" Command="{StaticResource comrefresh}" Glyph="/QueryResource;component/Images/Tree/refresh.png"/>
            <dxb:BarButtonItem Name="comparsion_data" Content="结构对比" Command="{StaticResource comdata}" Glyph="/QueryResource;component/Images/Tree/script_code.png"/>
            <dxb:BarButtonItem Name="comparsion_sync" Content="结构同步" Command="{StaticResource comsync}" Glyph="/QueryResource;component/Images/Tree/script_add.png"/>
            <dxb:BarButtonItem Name="comparsion_rowcount" Content="数据行数对比" Command="{StaticResource comrowcount}" Glyph="/QueryResource;component/Images/Tree/script_code_red.png"/>
            <dxb:BarButtonItem Name="comparsion_exportrow" Content="数据同步" Command="{StaticResource comexportrow}" Glyph="/QueryResource;component/Images/Tree/server_go.png"/>
            <dxb:BarButtonItem Name="comparsion_partexportrow" Content="部分数据同步" Command="{StaticResource compartexportrow}" Glyph="/QueryResource;component/Images/Tree/script_go.png"/>
            <dxb:BarButtonItem Name="comparsion_removetable" Content="移除相同表" Command="{StaticResource comremovetable}" Glyph="/QueryResource;component/Images/Tree/table_row_delete.png"/>
            <dxb:BarButtonItem Name="comparsion_comrowcontent" Content="数据内容对比" Command="{StaticResource comrowcontent}" Glyph="/QueryResource;component/Images/Tree/table_row_insert.png"/>
            
        </dxb:BarManager.Items>
        <DockPanel Name="dockPanel1">
            <dxr:RibbonControl Name="ribbonControl1" 
                                   DockPanel.Dock="Top"
                                   RibbonStyle="Office2010" 
                                   RibbonTitleBarVisibility="Collapsed" 
                                   >
                <!--<dxr:RibbonControl.ApplicationMenu>
                        <dxr:ApplicationMenu Height="100" />
                    </dxr:RibbonControl.ApplicationMenu>-->
                <!--<dxr:RibbonControl.PageHeaderItemLinks>
                        <dxb:BarItemLink BarItemName="btnmin" />
                        <dxb:BarItemLink BarItemName="btnmax" />
                        <dxb:BarItemLink BarItemName="btnclose" />
                    </dxr:RibbonControl.PageHeaderItemLinks>-->
                <dxr:RibbonDefaultPageCategory>
                    <dxr:RibbonPage Caption="文件">
                        <dxr:RibbonPageGroup Caption="连接" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="dbcreate" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="dbdelete" RibbonStyle="Large"/>
                            <dxb:BarItemLinkSeparator />
                            <dxb:BarItemLink BarItemName="dbconnection" RibbonStyle="SmallWithText"/>
                            <dxb:BarItemLink BarItemName="dbunconnection" RibbonStyle="SmallWithText"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="查询" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="fileopen" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="sbSave" RibbonStyle="Large"/>
                            <dxb:BarItemLinkSeparator />
                            <dxb:BarItemLink BarItemName="bAddDocument" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="txtrun" RibbonStyle="Large"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="剪切板" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="bPaste" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="bCut" RibbonStyle="SmallWithText"/>
                            <dxb:BarItemLink BarItemName="bClear" RibbonStyle="SmallWithText"/>

                            <dxb:BarButtonItemLink BarItemName="bSelectAll" RibbonStyle="SmallWithText"/>
                            <dxb:BarItemLink BarItemName="bComment" RibbonStyle="SmallWithText"/>
                            <dxb:BarItemLink BarItemName="bNoComment" RibbonStyle="SmallWithText"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="查找" ShowCaptionButton="False" Glyph="/QueryResource;component/Images/Tool/Find_32x32.png">
                            <dxb:BarButtonItemLink BarItemName="bFind" RibbonStyle="All"/>
                            <dxb:BarButtonItemLink BarItemName="bReplace" RibbonStyle="All"/>
                            <dxb:BarItemLinkSeparator />
                            <dxb:BarButtonItemLink BarItemName="txtundo" RibbonStyle="All"/>
                            <dxb:BarButtonItemLink BarItemName="txtredo" RibbonStyle="All"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="皮肤" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="gTheme"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="更新" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="bSetting"/>
                            <dxb:BarItemLink BarItemName="bUpdate"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="帮助" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="bAbout"/>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Caption="数据结转">
                        <dxr:RibbonPageGroup Caption="连接" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="comparsion_connection" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="comparsion_refresh" RibbonStyle="Large"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="数据结构比较" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="comparsion_data" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="comparsion_rowcount" RibbonStyle="Large"/>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="数据内容同步" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="comparsion_sync" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="comparsion_exportrow" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="comparsion_partexportrow" RibbonStyle="Large"/>

                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="其他" ShowCaptionButton="False">
                            <dxb:BarItemLink BarItemName="comparsion_comrowcontent" RibbonStyle="Large"/>
                            <dxb:BarItemLink BarItemName="comparsion_removetable" RibbonStyle="Large"/>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                </dxr:RibbonDefaultPageCategory>
            </dxr:RibbonControl>
            <dxr:RibbonStatusBarControl DockPanel.Dock="Bottom" Name="ribbonStatusBarControl1">
                <dxr:RibbonStatusBarControl.LeftItemLinks>
                    <dxb:BarItemLink BarItemName="lbFieldName" />
                    <dxb:BarItemLink BarItemName="lbIPname" />
                    <dxb:BarItemLink BarItemName="lbDBname" />
                    <dxb:BarItemLink BarItemName="lbUserId" />
                </dxr:RibbonStatusBarControl.LeftItemLinks>
                <dxr:RibbonStatusBarControl.RightItemLinks>
                    <dxb:BarItemLink BarItemName="lbUpdateInfo"/>
                </dxr:RibbonStatusBarControl.RightItemLinks>
            </dxr:RibbonStatusBarControl>

            <dxd:DockLayoutManager x:Name="dockManager" 
                                       DockItemClosed="dockManager_DockItemClosed"
                                       DockItemActivating="dockManager_DockItemActivating"
                                       Margin="0,-2,0,0" >
                <dxd:LayoutGroup Orientation="Horizontal" TabHeadersAutoFill="False">
                    <dxd:LayoutGroup ItemWidth="2*">
                        <dxd:LayoutPanel Caption="数据源" AllowClose="False" AllowRename="False" AllowMaximize="False" AllowMinimize="False">
                            <ctrl:DBTreeViewControl x:Name="dbtreeview"/>
                        </dxd:LayoutPanel>

                        <dxd:LayoutGroup Orientation="Vertical" ItemWidth="8*">
                            <dxd:DocumentGroup ItemHeight="7*" ClosePageButtonShowMode="InAllTabPageHeaders" ShowDropDownButton="False" SelectedTabIndex="1">
                                <dxd:DocumentPanel Name="documentSQL" Caption="文档" CaptionImage="/QueryResource;component/Images/Tool/copy-16x16.png"  AllowClose="False" AllowFloat="False" FloatOnDoubleClick="False" AllowMove="False" AllowContextMenu="False" AllowDock="False" AllowDrag="False" AllowMaximize="False" AllowMinimize="False" AllowRename="False">
                                    <ctrl:SQLControl x:Name="sqlcontrol" Tag="{Binding ElementName=documentSQL}"></ctrl:SQLControl>
                                </dxd:DocumentPanel>
                                <dxd:DocumentPanel x:Name="newNote" CaptionAlignMode="AutoSize"  CaptionImage="/QueryResource;component/Images/Tool/new-16x16.png" AllowClose="False" AllowFloat="False" AllowSelection="False" ToolTip="新建文档"  />
                            </dxd:DocumentGroup>
                            <dxd:TabbedGroup ItemHeight="3*" SelectedTabIndex="0">
                                <dxd:LayoutPanel Name="documentLog" Caption="日志" AllowClose="False" AllowRename="False">
                                    <ui:LogControl x:Name="logcontrol" ></ui:LogControl>
                                </dxd:LayoutPanel>
                                <dxd:LayoutPanel Name="documentDS" Caption="数据" ShowBorder="True" AllowClose="False" AllowRename="False">
                                    <ui:GridViewControl x:Name="gridviewcontrol" Tag="{Binding ElementName=documentDS}"></ui:GridViewControl>
                                </dxd:LayoutPanel>
                            </dxd:TabbedGroup>
                        </dxd:LayoutGroup>
                    </dxd:LayoutGroup>
                </dxd:LayoutGroup>
            </dxd:DockLayoutManager>
        </DockPanel>
    </dxb:BarManager>
</dx:DXWindow>
